import Vue from 'vue';
import App from './App';
import router from './router';
import store from './store'
import api from './api';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';    // 默认主题
// import '../static/css/theme-green/index.css';       // 浅绿色主题
import '../static/css/icon.css';
import "babel-polyfill";
import site from '@/config/site'

Vue.use(ElementUI, { size: 'small' });
Vue.prototype.$api = api;
Vue.prototype.$site = site;

//使用钩子函数对路由进行权限跳转
router.beforeEach((to, from, next) => {
    next();
})

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');